<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1{
            width: 400px;
            height: 50px;
            font-size: 24px;
            background: pink;
            border: 1px solid #000;
            cursor: pointer;
        }
        p{
            width: 500px;
            overflow: hidden;
            border: 1px solid #000;
        }
        .yellow{
            background: yellow;
        }
        /* h1:hover{
            background: yellow;
        } */
    </style>
</head>
<body>
    <h1 onmouseover="this.className='yellow'" onmouseout="this.className=''">中国大学校训</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit tempore accusamus facilis pariatur, saepe consectetur ex vitae voluptates nisi odit aut alias itaque quas delectus optio dolorum harum praesentium distinctio?</p>
</body>
</html>